package com.lyncs.ods.utils;

import com.lyncs.ods.constant.LyncsOdsConstant;
import com.lyncs.ods.properties.EmailConfigSetting;
import com.lyncs.ods.properties.SmsConfigSetting;

import java.text.MessageFormat;

/**
 * @author alex
 * @date 2022/6/6 21:53
 * @description
 */
public class SmsUtils {

    public static String buildContent(SmsConfigSetting setting, Object... params) {
        String content = MessageFormat.format(setting.getContent(), params);
        if (!setting.getWithPrefix()) {
            content = content.replace(LyncsOdsConstant.Common.HTTPS_PREFIX, "");
        }
        return content;
    }
}
